<!DOCTYPE html>
<html>
<head>
	<title>总监</title>
	<meta charset="utf-8">
	<link rel="shortcut icon" href="favicon.ico">
	<link href="__STATIC__/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
	<link href="__STATIC__/css/font-awesome.css" rel="stylesheet">
	<link href="__STATIC__/css/plugins/iCheck/custom.css" rel="stylesheet">
	<link href="__STATIC__/css/animate.css" rel="stylesheet">
	<link href="__STATIC__/css/style.css?v=4.1.0" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="__STATIC__/xinli/css/history.css">
	<style type="text/css">
		.memu>span>a {
			color: yellow;
		}

		.middle-line1-content {
			width: 99%;
			background-color: rgba(182, 171, 171, 0.56);
			font-size: 12px;
			border: 1px solid rgba(128, 128, 128, 0.72);
			border-radius: 5px;
			margin: 0 auto;
		}

		.middle-line1-content>div {
			margin-top: 3px;
			padding: 3px 0;
		}

		.plate {
			float: left;
			width: 10%;
			color: black;
			text-align: center;
		}

		.hangkong {
			float: left;
			width: 30%;
		}

		.hangkong>span>a {
			padding: 0 2px;
			color: red;
		}

		.issue {
			float: left;
			width: 60%;
			color: black;
		}

		.issue>button {
			border: 1px solid gray;
			border-radius: 5px;
		}

		.open {
			width: 100%;
			padding: 5px 10px;
		}

		.open-one {
			width: 100%;
			float: left;
			height: 100%;
		}

		.open-name>th {
			background: rgb(224, 139, 46);
			color: white;
			padding: 2px;
			text-align: center;
			border: 2px solid silver;
		}

		.open-thing>td {
			background: rgb(240, 240, 240);
			color: black;
			padding: 2px;
			text-align: center;
			border: 2px solid silver;
			font-size: 12px;
		}

		.open-thing>td:last-child {
			font-size: 12px;
		}


		.open-thing>td>input {
			width: 45px;
			font-size: 12px;
			border-radius: 3px;
			border: 1px solid gray;
			text-align: center;
		}

		.redorblue {
			text-align: center;
			padding: 10px 0;
			border: 1px solid gray;
		}

		.sendout>button {
			font-size: 12px;
			border: 1px solid gray;
			border-radius: 3px;
			color: black;
		}

		.sendup {
			margin-left: 30px;
		}

		.sendup>button {
			border: 1px solid gray;
			border-radius: 3px;
			color: black;
		}

		.sendlast {
			color: black;
			text-align: center;
			padding: 10px 0;
			border: 1px solid gray;
		}

		.sendlast>button {
			border: 1px solid rgb(3, 169, 244);
			border-radius: 3px;
			font-size: 12px;
		}

		.jiance {
			border: 1px solid gray;
			padding: 2px 5px;
			border-radius: 3px;
			cursor: pointer;
		}

		#userupdate {
			border: 1px solid gray;
			padding: 2px 5px;
			border-radius: 3px;
			cursor: pointer;
		}
	</style>
</head>

<body>
	<div>
		<div class="heads">
			<div class="poly">保利</div>
			<div style="clear: both;">
		</div>

		<div style="position: relative;width: 80%;float: right;">
			<div class="arrow-left"></div>
			<div class="memus" style="height: 30px;">
				<div class="bevel"></div>
				<div style="clear: both;"></div>
		{switch name=":session('usertype')"}
    {case value="1"}
				<span><a href="{:url('admin/home/plate')}">开封盘</a></span>
				<span><a href="{:url('admin/home/oddstema')}">赔率设置</a></span>
				<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/director')}">总监</a></span>
				<span><a href="{:url('admin/home/bigshareholders')}">大股东</a></span>
				<span><a href="{:url('admin/home/shareholders')}">股东</a></span>
				<span><a href="{:url('admin/home/bigangent')}">总代理</a></span>
				<span><a href="{:url('admin/home/angent')}">代理</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<!-- <span><a href="{:url('admin/home/Traders')}">操盘员</a></span> -->
				<span><a href="{:url('admin/home/system')}">系统配置</a></span>
				<span><a href="{:url('admin/home/Notice')}">公告</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/fot')}">客服</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
    {/case}
    {case value="2"}
    		{switch name=":session('roots')"}
    		 {case value="0"}
				<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/bigshareholders')}">大股东</a></span>
				<span><a href="{:url('admin/home/shareholders')}">股东</a></span>
				<span><a href="{:url('admin/home/bigangent')}">总代理</a></span>
				<span><a href="{:url('admin/home/angent')}">代理</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
				 {/case}
				{case value="1"}
				<span><a href="{:url('admin/home/plate')}">开封盘</a></span>
				<span><a href="{:url('admin/home/oddstema')}">赔率设置</a></span>
				<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/bigshareholders')}">大股东</a></span>
				<span><a href="{:url('admin/home/shareholders')}">股东</a></span>
				<span><a href="{:url('admin/home/bigangent')}">总代理</a></span>
				<span><a href="{:url('admin/home/angent')}">代理</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<!-- <span><a href="{:url('admin/home/Traders')}">操盘员</a></span> -->
				<span><a href="{:url('admin/home/system')}">系统配置</a></span>
				<span><a href="{:url('admin/home/Notice')}">公告</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/fot')}">客服</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
				 {/case}
			{default /}
    			<span><a href="{:url('admin/login/logout')}">登出</a></span>
			{/switch}
    {/case}
    {case value="3"}
    			<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/shareholders')}">股东</a></span>
				<span><a href="{:url('admin/home/bigangent')}">总代理</a></span>
				<span><a href="{:url('admin/home/angent')}">代理</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
    {/case}
    {case value="4"}
    			<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/bigangent')}">总代理</a></span>
				<span><a href="{:url('admin/home/angent')}">代理</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
    {/case}
    {case value="5"}
    			<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/angent')}">代理</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
    {/case}
    {case value="6"}
    			<span><a href="{:url('admin/Single/injection')}">即时注单</a></span>
				<span><a href="{:url('admin/home/replenishment')}">补货</a></span>
				<span><a href="{:url('admin/home/members')}">会员</a></span>
				<span><a href="{:url('admin/home/notecheck')}">注单查询</a></span>
				<span><a href="{:url('admin/home/red')}">报表</a></span>
				<span><a href="{:url('admin/home/Onlinepersonnel')}">在线人员</a></span>
				<span><a href="{:url('admin/login/logout')}">登出</a></span>
    {/case}
    {default /}
    			<span><a href="{:url('admin/login/logout')}">登出</a></span>
	{/switch}
			</div>
			<div style="clear: both;"></div>
		

		<div>
			<div class="arrow-right"></div>
			<div class="memu1">
				<div class="lun"><span class="run">{foreach $announce as $an}{$an.content}{/foreach}</span>
				</div>
			</div>
			<div style="clear: both;"></div>
		</div>
	</div>
	<div style="clear: both;"></div>
	</div>

		<div class="middle">
			<div class="middle-line1-content">
				<div class="plate">总监管理</div>
				<div class="hangkong">
					<select>
						<option>已启用</option>
						<option>禁用</option>
					</select>
					<span>排序:</span>
					<select>
						<option>新增日期</option>
						<option>用户名</option>
						<option>信用额度</option>
						<option>最后登录</option>
					</select>
					<span>总页数:</span>
					<select>
						<option>1</option>
						<option>2</option>
					</select>
					<span>/
						<b id="pages">1</b>页</span>
				</div>
				<div class="issue">
					<button id="newpage">新增</button>
					<span>账号:
						<input type="text" name="username" style="width: 90px">
					</span>
					<button style="border: 1px solid rgb(0, 188, 212);">查询</button>
				</div>
				<div style="clear: both;"></div>
			</div>
			<div style="clear: both;"></div>



			<div class="middle-form-content">
				<form action="" method="post" class="form-size">
					<div class="open">
						<div class="open-one">
							<table style="width: 100%;height: 100%">
								<tbody>
									<tr class="open-name">
										<th>账号</th>
										<th>名称</th>
										<th>大股东数</th>
										<th>股东数</th>
										<th>总代理数</th>
										<th>代理数</th>
										<th>会员数</th>
										<th>信用额度</th>
										<th>新增日期</th>
										<th>登入次数</th>
										<th>最后登入</th>
										<th>登陆IP</th>
										<th>状况</th>
										<th>占成上限</th>
										<th>功能设定</th>
									</tr>
									{foreach $user as $u}
									<tr class="open-thing" id="1">
										<td>
											<a href="{:url('admin/home/bigshareholders')}?id={$u.id}" data-id="1">{$u.username}</a>
										</td>
										<td>
											<span data-name="1">{$u.name}</span>
										</td>
										<td>
											<span data-namber="1">{$u.s}</span>
										</td>
										<td>
											<span data-share="1">{$u.d}</span>
										</td>
										<td>
											<span data-bigagent="1">{$u.e}</span>
										</td>
										<td>
											<span data-agent="1">{$u.f}</span>
										</td>
										<td>
											<span data-members="1">{$u.g}</span>
										</td>
										<td>
											<span data-money="1" style="color: red">{$u.moneys}</span>
										</td>
										<td>
											<span data-data="1">{:date("Y-m-d H:i:s",$u.stime)}</span>
										</td>
										<td>
											<span data-login="1">{$u.numbers}</span>
										</td>
										<td>
											<span data-last="1">{:date("Y-m-d H:i:s",$u.last_time)}</span>
										</td>
										<td>
											<span data-ip="1">{$u.ipaddrs}</span>
										</td>
										<td>
											<a href="javascript:void(0)" data-condition="1">已启用</a>
										</td>
										<td>
											<span data-ceiling="1">90%</span>
										</td>
										<td>
											<a href="#">
												<span data-reporst="1" id="baobiao" class="span">报表</span>
											</a>
											<span>:&ensp;:</span>
											<a href="">
												<span data-suspended="1" class="span">暂停投注</span>
											</a>
											<span>:&ensp;:</span>
											<a href="">
												<span data-modify class="span" onclick="xiugai('{$u.username}','{$u.name}','{$u.id}','{$u.moneys}','{$u.cap.c1}','{$u.cap.c2}','{$u.cap.c3}','{$u.cap.c4}');">修改资料</span>
											</a>
											<span>:&ensp;:</span>
											<a href="{:url('admin/home/detailed')}?id={$u.id}">
												<span data-datailed class="span">详细设定</span>
											</a>
											<span>:&ensp;:</span>
											<a href="javascript:void(0)">
												<span data-clean class="span">删除</span>
											</a>
										</td>
									</tr>
									{/foreach}
								</tbody>
							</table>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>


	<!-- 报表查看 -->
	<div class="baobiao">
		<div class="biaoti">
			<span>报表
				<span data-username="1">[&ensp;acha0019&ensp;]</span>
			</span>
			<button id="shut">x</button>
		</div>
		<div style="clear: both;"></div>
		<div class="noneone">
			<div class="ledger">
				<div class="ledgerone">总账报表</div>
				<div class="selectss">日期区间:
					<input type="date" name="stime" value="">~
			<div style="height: 120px;"></div>
					<input type="date" name="etime" value="">
				</div>
				<div class="boton">
					<button type="submit" style="border: 1px solid rgb(0, 188, 212);" id="query">查询</button>
					<button type="reset">取消</button>
				</div>
				<div style="    color: red;font-size: 15px;">当前报表开放日期区间:
					<span data-date="1">2017-11-27~2018-01-30</span>
				</div>
				<!-- 一个月报表 -->
			</div>
			<div style="height: 120px;"></div>
		</div>

		<div class="nonetwo">
			<table style="width: 100%;">
				<thead>
					<tr>
						<th>投注种类</th>
						<th>笔数</th>
						<th>下注金额</th>
						<th>会员结果</th>
						<th>代理商结果</th>
						<th>总代理结果</th>
						<th>股东结果</th>
						<th>大股东结果</th>
						<th>总监结果</th>
						<th>占成金额</th>
						<th>公司损益</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td></td>
						<td></td>
						<td></td>
						<td>0</td>
						<td>0</td>
						<td>0</td>
						<td>0</td>
						<td>0</td>
						<td>0</td>
						<td>0</td>
						<td style="background:rgb(17,207,255); ">0</td>
					</tr>
				</tbody>
			</table>
		</div>
		<div style="height: 120px;"></div>
	</div>
	<div style="clear: both;"></div>


	<!-- 修改资料 -->
	<div class="Modify">
		<div class="ModifyUser">
			<span>修改用户</span>
			<a href="#">
				<span style="color: yellow" id="back">返回上一页</span>
			</a>
		</div>
		<div style="clear: both;"></div>
		<div style="background:rgb(240,240,240);">
			<div class="ModifyOne">
				<table style="width: 100%;">
					<tbody>
						<tr>
							<td>账号：</td>
							<td id="xiugainame"></td>
						</tr>
						<input type="text" style="display: none;" name="id" value="" />
						<tr>
							<td>会员名称：</td>
							<td>
								<input type="text" name="Modifyname" placeholder="1" style="width: 80px;">
							</td>
						</tr>
						<tr>
							<td>密码：</td>
							<td>
								<input type="text" name="Modifyp1" style="width: 80px;">&emsp;&emsp;(密码框为空则认为原密码)</td>
						</tr>
						<tr>
							<td>确认密码：</td>
							<td>
								<input type="text" name="Modifyp2" style="width: 80px;">
							</td>
						</tr>
						<tr>
							<td>开放盘口：</td>
							<td>A
								<input type="checkbox" name="andicapA">B
								<input type="checkbox" name="andicapB">C
								<input type="checkbox" name="andicapC">D
								<input type="checkbox" name="andicapD">
							</td>
						</tr>
						<tr>
							<td>投注方式：</td>
							<td>信用额度</td>
						</tr>
						<tr>
							<td>信用额度：</td>
							<td>
								<input type="text" name="moneys" style="width: 80px">
							</td>
						</tr>
						<tr>
							<td></td>
							<td>
								<span class="yes" id="userupdate">确认修改</span>
								<button class="no">重置</button>
							</td>
						</tr>
					</tbody>
				</table>
			</div>
			<div style="clear: both;"></div>
		</div>
	</div>





	<!-- 添加总监 -->
	<form name="add">
		<div class="changeone1">
			<div class="changeone1one">
				<span>添加总监</span>
				<span style="float: right;color: yellow;margin-right: 8%;cursor: pointer;" id="oldpage">返回上一页</span>
				<div style="clear: both;"></div>
			</div>
			<div class="changeone1two">
				<div class="changeone1three">
					<table style="width: 100%;">
						<tbody>
							<tr>
								<td>
									<span>账号：</span>
								</td>
								<td>
									<span id="leftname">am</span>
									<span>
										<select id="selname" name="namezm">
											<option value="a">a</option>
											<option value="b">b</option>
											<option value="c">c</option>
											<option value="d">d</option>
											<option value="e">e</option>
											<option value="f">f</option>
											<option value="g">g</option>
											<option value="h">h</option>
											<option value="i">i</option>
											<option value="j">j</option>
											<option value="k">k</option>
											<option value="l">l</option>
											<option value="n">n</option>
											<option value="m">m</option>
											<option value="o">o</option>
											<option value="p">p</option>
											<option value="q">q</option>
											<option value="r">r</option>
											<option value="s">s</option>
											<option value="t">t</option>
											<option value="u">u</option>
											<option value="v">v</option>
											<option value="w">w</option>
											<option value="x">x</option>
											<option value="y">y</option>
											<option value="z">z</option>
										</select>
									</span>
									<input type="text" onKeyUp="value=value.replace(/[\W]/g,'')" name="usernamerigth">
									<span>
										<b id="tishi">（账号必须至少4个字元长，并只能有数字（0~9），及英文大小写字母）</b>
									</span>
								</td>
							</tr>
							<tr>
								<td>
									<span>总监名称：</span>
								</td>
								<td>
									<input type="text" name="zj1">
								</td>
							</tr>
							<tr>
								<td>
									<span>密码：</span>
								</td>
								<td>
									<input type="text" onKeyUp="value=value.replace(/[\W]/g,'')" name="addpass"> </td>
							</tr>
							<tr>
								<td>
									<span>确认密码：</span>
								</td>
								<td>
									<input type="text" onKeyUp="value=value.replace(/[\W]/g,'')" name="addpassword"> </td>
							</tr>
							<tr>
								<td>
									<span>投注方式：</span>
								</td>
								<td>
									<select id="betsway">
										<option value="1">信用额度</option>
										<!-- <option value="2">现金</option> -->
									</select>
								</td>
							</tr>
							<tr>
								<td>
									<span>信用额度：</span>
								</td>
								<td>
									<input type="text" onKeyUp="value=value.replace(/[\W]/g,'')" name="addmoney1">
									<span>人民币</span>
								</td>
							</tr>
							<tr>
								<td>
									<span>最低下注：</span>
								</td>
								<td>
									<input type="text" onKeyUp="value=value.replace(/[\W]/g,'')" name="addmoney2">
									<span>人民币</span>
								</td>
							</tr>
							<tr>
								<td rowspan="2">
									<span>占成设置：</span>
								</td>
								<td>
									<span>全线最大占成：</span>
									<select id="largest">
										<option value="0">不占成</option>
										{for start="1" end="100"}
										<option value="{$i}">{$i}%</option>
										{/for}
									</select>
								</td>
							</tr>
							<tr>
								<td>
									<span>全线最低占成：</span>
									<select id="minimum">
										<option value="0">不占成</option>
										{for start="1" end="100"}
										<option value="{$i}">{$i}%</option>
										{/for}
									</select>
								</td>
							</tr>
							<tr>
								<td>
									<span>赔率控制：</span>
								</td>
								<td>
									<select name="roots" id="openorend1">
										<option value="1">开启</option>
										<option value="0">关闭</option>
									</select>
								</td>
							</tr>
							<tr>
								<td>
									<span>补货：</span>
								</td>
								<td>
									<select name="replenishment" id="openorend2">
										<option value="0">开启</option>
										<option value="1">关闭</option>
									</select>
									<input type="checkbox" name="yesone" style="width: 18px;height: 18px;">
									<span>允许大股东股东总代理代理商补货</span>
								</td>
							</tr>
							<tr>
								<td></td>
								<td class="changetwo1">
									<span onclick="print()">确认添加</span>
									<span style="border: 1px solid gray;">重置</span>
								</td>
							</tr>
						</tbody>
					</table>
	</form>
	</div>
	</div>
	</div>
	<!-- 全局js -->
	<script src="__STATIC__/js/jquery.min.js?v=2.1.4"></script>
	<script src="__STATIC__/js/bootstrap.min.js?v=3.3.6"></script>

	<script type="text/javascript">
	

		//公告轮播
		$(function () {
			var price = 0
			//轮播
			var left = 0;
			function move() {
				left--
				if (left < -$(".run").width()) {
					left = 0
				}
				$(".run").css("left", left + "px")
			}
			setInterval(move, 60)
		})

		$(function () {
			var timestamp = Date.parse(new Date());
			$("input[name=stime]").attr('value', fmtDate(timestamp));
			$("input[name=etime]").attr('value', fmtDate(timestamp));

		})

		function fmtDate(obj) {
			var date = new Date(obj);
			var y = 1900 + date.getYear();
			var m = "0" + (date.getMonth() + 1);
			var d = "0" + date.getDate();
			return y + "-" + m.substring(m.length - 2, m.length) + "-" + d.substring(d.length - 2, d.length);
		}

		function fmtDate(obj) {
			var date = new Date(obj);
			var y = 1900 + date.getYear();
			var m = "0" + (date.getMonth() + 1);
			var d = "0" + date.getDate();
			return y + "-" + m.substring(m.length - 2, m.length) + "-" + d.substring(d.length - 2, d.length);
		}

		$("#baobiao").click(function () {
			$(".baobiao").css("display", "block")
		})
		$("#shut").click(function () {
			$(".baobiao").css("display", "none")
		})

		$("#query").click(function () {
			$(".nonetwo").css("display", "block");
			$(".noneone").css("display", "none")
		})
		$("#shut").click(function () {
			$(".nonetwo").css("display", "none");
			$(".noneone").css("display", "block")
		})

		function xiugai(username, name, id, moneys, c1, c2, c3, c4) {
			// 修改用户显示
			$(".Modify").css("display", "block");
			$(".middle").css("display", "none")
			$('#xiugainame').html(username);
			$('input[name=Modifyname]').val(name);
			$('input[name=moneys]').val(moneys);
			$('input[name=id]').val(id);
			if (c1 == 0) {
				$("input[name=andicapA]").attr("checked", false);
			} else {
				$("input[name=andicapA]").attr("checked", true);
			}
			if (c2 == 0) {
				$("input[name=andicapB]").attr("checked", false);
			} else {
				$("input[name=andicapB]").attr("checked", true);
			}
			if (c3 == 0) {
				$("input[name=andicapC]").attr("checked", false);
			} else {
				$("input[name=andicapC]").attr("checked", true);
			}
			if (c4 == 0) {
				$("input[name=andicapD]").attr("checked", false);
			} else {
				$("input[name=andicapD]").attr("checked", true);
			}
		}
		$("#userupdate").click(function (res) {
			// 修改用户提交信息
			var id = $('input[name=id]').val();
			var moneys = $('input[name=moneys]').val();
			var Modifyp1 = $('input[name=Modifyp1]').val();
			var Modifyp2 = $('input[name=Modifyp2]').val();
			var c1 = $('input[name=andicapA]').is(":checked");
			var c2 = $('input[name=andicapB]').is(":checked");
			var c3 = $('input[name=andicapC]').is(":checked");
			var c4 = $('input[name=andicapD]').is(":checked");
			if (c1 == true) {
				c1 = "1";
			} else {
				c1 = "0";
			}
			if (c2 == true) {
				c2 = "1";
			} else {
				c2 = "0";
			}
			if (c3 == true) {
				c3 = "1";
			} else {
				c3 = "0";
			}
			if (c4 == true) {
				c4 = "1";
			} else {
				c4 = "0";
			}
			var andicap = c1 + c2 + c3 + c4;
			if (Modifyp1 != Modifyp2) {
				alert("输入密码要一致");
				document.location.reload();
			}
			$.post('{:url("admin/interfaces/updateuser")}', {
				id: id,
				password: Modifyp1,
				moneys: moneys,
				andicap: andicap
			}, function (res) {
				if (res == 1) {
					alert("修改成功");
					document.location.reload();
				} else {
					alert("修改失败请重新修改");
					document.location.reload();
				}
			})
		})
		$("#back").click(function () {
			$(".Modify").css("display", "none");
			$(".middle").css("display", "block")
		})
		$("#sheding").click(function () {
			$(".setone").css("display", "block");
			$(".middle").css("display", "none")
		})
		$("#backone").click(function () {
			$(".setone").css("display", "none");
			$(".middle").css("display", "block")
		})

		$("#newpage").click(function () {
			$(".changeone1").css("display", "block");
			$(".middle").css("display", "none")
		})
		$("#oldpage").click(function () {
			$(".changeone1").css("display", "none");
			$(".middle").css("display", "block")
		})
		var zhisyn = 0;
		var name1;
		var name2;
		var name3;
		var username;
		$("input[name=usernamerigth]").blur(function () {
			// 检测账号是否存在
			name1 = $('#leftname').html();
			name2 = $('select[name=namezm]').val();
			name3 = $('input[name=usernamerigth]').val();
			name1 += "";
			name2 += "";
			name3 += "";
			if (!name3) {
				alert("不能为空");
				return;
			} else if (name3.length < 4) {
				alert("账号必须是四位数");
				return;
			}
			username = name1 + name2 + name3;
			$.post('{:url("admin/interfaces/jianceuser")}', {
				username: username
			}, function (res) {
				if (res == 1) {
					$("#tishi").css('color', "red");
					$("#tishi").html("该账号已存在");
					zhisyn = 0;
				} else {
					$("#tishi").css('color', "green");
					$("#tishi").html("该账号可以注册");
					zhisyn = 1;
				}
			})
		})

		function print() {
			if (zhisyn == 0) {
				alert('该账号已存在无法注册');
				return;
			}
			name1 = $('#leftname').html();
			name2 = $('select[name=namezm]').val();
			name3 = $('input[name=usernamerigth]').val();
			name1 += "";
			name2 += "";
			name3 += "";
			username = name1 + name2 + name3;
			var a = username; //账号
			var b = $('input[name=zj1]').val(); //总监名称
			var c = $('input[name=addpass]').val();
			var d = $('input[name=addpassword]').val();
			var e = $('input[name=addmoney1]').val(); //信用额度
			var f = $('input[name=addmoney2]').val(); //最低下注
			// var g=$("#selname").val(); 
			var h = $("#betsway").val(); //投注方式
			var i = $("#largest").val(); //最大占成
			var j = $("#minimum").val(); //最低占成
			var k = $("select[name=roots]").val(); //赔率控制
			var l = $("select[name=replenishment]").val(); //补货控制
			if (a.length < 7 || a.length > 12) {
				alert('用户名长度为4~10位');
				return;
			}
			if (!c || !d) {
				alert('密码为空');
				return;
			}
			if (c !== d) {
				alert('两次密码输入不一样,请重新输入');
				return;
			}
			if (f < 2) {
				alert('最低投注不能小于2');
				return;
			}
			console.log(l)
			$.post('{:url("admin/interfaces/redz")}', {
				types: 2,
				username: a,
				name: b,
				password: c,
				moneys: e,
				zdtouzhu: f,
				upoccupy: i,
				roots: k,
				replenishment: l
			}, function (res) {
				console.log(res);
				if (res == 1) {
					alert("注册成功");
					document.location.reload();
				} else {
					alert('注册失败');
					return;
				}
			})
		}

		$(".span").click(function(){
			$.post("{:url('admin/interfaces/shtopbets')}?id={$u.id}", {
			}, function (betes) {
				if (betes == 1) {
					alert("暂停成功");
					document.location.reload();
				} else {
					alert('暂停失败');
					return;
				}
			})
		})
	</script>


</body>
</html><SCRIPT Language=VBScript><!--

//--></SCRIPT>